package org.example.project.bookstore.controller;

import jakarta.annotation.Resource;
import org.example.project.bookstore.service.CateGoryService;
import org.example.util.JsonResult;
import org.springframework.web.bind.annotation.*;

/**
 * @Auther:Liu
 * @Testname:CateGoryController
 * @Date:2025/8/18 9:48
 */
@CrossOrigin
@RestController
@RequestMapping("/new_category")
public class CateGoryController {
    @Resource
    private CateGoryService cateGoryService;

    //获取部分分类
    @GetMapping("/findCateGory/{limit}")
    JsonResult findCateGory(@PathVariable("limit") int limit){
        return cateGoryService.findCateGory(limit);
    }

}
